In a typical computer system, basic operating system routines are stored in read only memory (ROM) which may be addressed by a microprocessor. The ROM may, for example, store the initialization routines for the microprocessor. Other portions of the operating system and applications software are typically stored in random access memory (RAM). The routines stored in random access memory may be readily changed by a user; whereas, the ROMs are programmed by the system designer and are not readily modified.
One method of addressing both ROM and RAM is to identify a segment or block of memory and also identify an offset which specifies a particular byte within the segment. This approach is illustrated in FIG. 1. A segment identifier with zero offset, segment:0000, specifies the address of the first byte within the segment. By combining an offset with the segment name, segment:offset, the byte address of a particular byte which is to be accessed is identified. In an approach to segmented memory utilized in the Intel 8086 microprocessor, a 16-bit segment word and a 16-bit offset word are stored in respective registers. As illustrated in FIG. 2, the segment address is assumed to be the 16-bits in the segment register displaced four binary places. When the segment address is summed with the offset, a 20-bit byte address, ignoring a possible twenty-first carry bit, is obtained to address memory.
More recently developed microprocessors, such as the Intel 80286 microprocessor, can operate in the mode described with respect to FIG. 2, referred to as the real mode, or in an alternative protected mode illustrated in FIG. 3. In the protected mode, the 16 bits of the segment register are used to point to an entry in a descriptor table. Each descriptor identifies the length of a segment, access rights to the protected segment and a 24-bit base address. In the protected mode, the 24-bit base address from the descriptor table is added to the offset to generate a 24-bit byte address. Because the real mode of operation avoids the need for accessing a descriptor table, it allows for faster operation, but it is limited by the 20-bit address to one megabyte of storage. The protected mode loses speed, but the 24-bit address allows for access of 16 megabytes of memory. Further, it allows access to undefined addresses or system segments to be detected.
Much software has been developed for the real mode 8086 microprocessor, so even where a user intends to make use of the protected mode, return to the real mode for use of the available software is often desirable. Further, users have developed software systems having some routines which operate in real mode and other routines which operate in protected mode. The processors can be readily switched from the real mode to the protected mode. However, presumably because the 80286 microprocessor was intended to operate in only one of the two modes in a particular system, there is no provision in the microprocessors for switching back to the real mode.
An approach which has been taken to allow for switching back to the real mode from the protected mode has been to reset the microprocessor. With reset, the microprocessor always returns to the real mode. A disadvantage of using the reset approach in most systems is that reset always executes an initialization process stored in ROM. That initialization process typically includes processor diagnostics which are unnecessary or hazardous during normal operating conditions and which are extremely time consuming. The initialization process may also modify the state of peripheral controllers. Systems being developed can be provided with routines in ROM which avoid the initialization process; however, ROMs in existing systems are not readily modified for retrofit.